import { 
  FETCH_TVS_REQUEST,
  FETCH_TVS_FAILURE,
  FETCH_TVS_SUCCESS, 
} from '../actions/actionTypes';

export const getTVLists = (state={}, action) => {
  switch (action.type) {
    case FETCH_TVS_REQUEST:
      return Object.assign({}, state, { isFetching: true })
    case FETCH_TVS_SUCCESS:
      return Object.assign({}, state, { isFetching: false, lists: action.lists })
    case FETCH_TVS_FAILURE:
      return Object.assign({}, state, { isFetching: false })
    default:
      return state
  }
}